<!--
- File:    支付成功页.
-->
<template>
  <div class="payment_box">
    <i class="iconfont icon-chenggong"></i>
    <h3>支付成功</h3>
    <div class="button f-cb">
      <span class="btn1 fl" @click="gotoOrderDetail">查看订单</span>
      <router-link :to="{name: 'home'}">
        <span class="btn1 fr">返回首页</span>
      </router-link>
    </div>
    <footer-tab></footer-tab>
  </div>
</template>

<script>
  export default{
    data() {
      return {
        id: this.$route.query.id,
        type: this.$route.query.type || this.$utils.getQueryString('type') // 订单类型 1 买花 2 租花 3 月卡 4积分商品
      }
    },
    methods: {
      gotoOrderDetail() {
        let routerName = 'order-detail'
        switch (this.type) {
          case '1':
            routerName = 'order-detail'
            break
          case '2':
            routerName = 'order-rent-detail'
            break
          case '3':
            break
          case '4':
            routerName = 'order-integral-detail'
            break
        }
        this.$router.push({name: routerName, params: {id: this.id}})
      }
    }
  }
</script>

<style>

</style>